<!DOCTYPE html>
<html lang="en" style="">
<head>
	<title>README | PhalApi - A light-weight PHP framework for API</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="icon" href="http://webtools.qiniudn.com/dog_catch.png" type="image/x-icon" />
	<meta name="description" content="PhalApiis A light-weight PHP framework for API!">
	<meta name="keywords" content="PhalApi,phalapi,phalapi API develop,backend framework,restful,web services,saas,microservice,API framework,open API framework,PHP API framework,php web framework">
	<meta name="author" content="dogstar">

	<link rel="stylesheet" type="text/css" href="./../..//css/screen.css?20150211" />
</head>

<body>
<a href="https://github.com/phalapi/phalapi">
	<img alt="Fork me on GitHub" data-canonical-src="http://cdn71.phalapi.net/images/2/2d/9e69c0ebaff22a24e241a0244532e.png" src="http://cdn71.phalapi.net/images/2/2d/9e69c0ebaff22a24e241a0244532e.png" style="position: absolute; top: 0; right: 0; border: 0;">
</a>

<!-- 最顶部的语言(S) -->
<div class="grid-wrapper navbar desktop-only">
	<div class="grid">
		<div class="grid__cell">
			<ul id="language-switchers" class="navbar__links navbar--left">
                <li class="menu-item"><a title="PhalApi官方网站中文版" href="/" class="menu-item__link">Chinese</a></li>
				<li class="menu-item"><a title="English version of PhalApi website" href="/wikis/en/" class="menu-item__link">English</a></li>
			</ul>
			<ul id="util-menu" class="navbar__links navbar--right navbar--vertical-separator">
				<li class="menu-item"><a href="#" class="menu-item__link contact-us-spec">Welcome Here!</a></li>
			</ul>
		</div>
	</div>
</div>
<!-- 最顶部的语言(E) -->

<!-- 顶部导航菜单(S) -->
<div class="grid-wrapper desktop-only">
	<div class="grid">
		<div class="grid__cell">
			<div class="header__header-wrapper">
				<a title="PhalApi" href="http://www.phalapi.net" class="header__logo"><img src="http://webtools.qiniudn.com/master-LOGO-20150410_33.jpg" id="tw-logo" alt="PhalApi"></a>
				<ul id="main-menu" class="header__menu">
					<li class="menu-item"><a href="http://qa.phalapi.net/" class="menu-item__link insights-spec" target="_blank">Community</a></li>
					<li class="menu-item"><a href="https://github.com/phalapi/phalapi" class="menu-item__link insights-spec" target="_blank">Download</a></li>
					<li class="menu-item"><a href="/wikis/en/" class="menu-item__link events-spec" target="_blank">Wikis</a></li>
    				<li class="menu-item"><a href="/docs_en/" class="menu-item__link events-spec" target="_blank">Classes docs</a></li>
					<li class="menu-item"><a href="http://demo.phalapi.net/" class="menu-item__link products-spec" target="_blank">Demo</a></li>
					<li class="menu-item"><a href="/about.html" class="menu-item__link about-us-spec" target="_blank">About us</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<!-- 顶部导航菜单(E) -->


    <div class="grid-wrapper">
        <div class="grid">
            <div class="grid__cell">
                <h1>PhalApi - A light-weight PHP framework for API  - V1.3.2</h1>
<h1><a href="https://github.com/phalapi/phalapi">PhalApi</a></h1>
<h1>Welcome to use PhalApi!</h1>
<p>PhalApi is a light-weight framework focus on how to develop API faster and simple.
If you have any questions, please feel free to contact us with email(chanzonghuang@gmail.com), or create an issue (<a href="https://github.com/phalapi/phalapi/issues">https://github.com/phalapi/phalapi/issues</a>)</p>
<p>You can use PhalApi to develop APIs very fastly and easily for Android/iOS/Windowns/Website/H5, but also build microservice/web services/RESTful for big data.
Besides, you will explore Agile development, TDD, auto-generation etc. on the way to emergent design.   </p>
<p>There is more than I can say. Just rock it!  </p>
<blockquote>
<p>PhalApi is created from China since 2015, and we will try out best to make it clear how to use it smootly to everyone.   </p>
</blockquote>
<h1>Install &amp; Usage</h1>
<ul>
<li><em>download lastest stable version from release branch</em></li>
<li><em>PhalApi need PHP &gt;= 5.3.3</em></li>
</ul>
<p>After unpack PhalApi on your server, you can visit:</p>
<pre><code>http://localhost/path/to/PhalApi/Public/demo/

// output
{
    "ret": 200,
    "data": {
        "title": "Default Api",
        "content": "PHPer您好，欢迎使用PhalApi！",
        "version": "1.1.0",
        "time": 1422779027
    },
    "msg": ""
}</code></pre>
<h1>Demo online</h1>
<pre><code>//default api
http://demo.phalapi.net/

//api with params
http://demo.phalapi.net/?service=Default.Index&amp;username=oschina

//illegal api
http://demo.phalapi.net/?service=Demo.None
{
    "ret": 400,
    "data": [],
    "msg": "非法请求：服务Demo.None不存在"
}</code></pre>
<h1>[COOL!] Auto-generated API documents online</h1>
<p>Here is a demo,</p>
<pre><code>http://demo.phalapi.net/demo/checkApiParams.php</code></pre>
<p><img src="http://cdn71.phalapi.net/20150613.png" alt="mahua" /></p>
<h1>[TOP!] SDK base on DSL</h1>
<p>We can request api like:</p>
<pre><code>PhalApiClientResponse response = PhalApiClient.create()
       .withHost("http://demo.phalapi.net/")
       .withService("Default.Index")          //service
       .withParams("username", "dogstar")     //params
       .withTimeout(3000)                     //timeout
       .request();</code></pre>
<p>Curently, we provide:</p>
<ul>
<li>JAVA SDK </li>
<li>Objective-c SDK</li>
<li>PHP SDK</li>
<li>C# SDK</li>
<li>JS SDK</li>
</ul>
<h1>Structure</h1>
<pre><code>.
│
├── PhalApi         // PhalApi framework, you can upgrade it in the furture
│
│
├── Public          // public visit
│   └── demo        // Demo entrance
│
│
├── Config          // common configs include app.php/sys.php/dbs.php, ect
├── Data            // common data
├── Language        // common translation
├── Runtime         // runtime log
│
│
└── Demo            // Demo
    ├── Api             // Api
    ├── Domain          // Domain
    ├── Model           // Model
    └── Tests           // PHPUnit tests
</code></pre>
<h1>Join us!</h1>
<p>Welcome to join us to do something cool!</p>
<h1>Changelog</h1>
<p><a href="http://www.phalapi.net/wikis/%5B5.6%5D-%E6%9B%B4%E6%96%B0%E6%97%A5%E8%AE%B0.html">changelog</a></p>
            </div>
        </div>
    </div>
    
 <!-- 广告位 -->
<!--
<div class="grid-wrapper desktop-only">
	<p align="center">
		<a href="http://cdn71.phalapi.net/走向开源的第一年%20-%20PhalApi%202015年度开源总结%20-%20官方出品%20-%2020151214.pdf" target="blank"><img width="950" height="100" src="http://cdn71.phalapi.net/PhalApi20151213-2.jpg"></a>
		<a href="http://qa.phalapi.net" target="blank"><img width="950" height="100" src="http://cdn71.phalapi.net/qa_ad_20150615.jpg"></a>
	</p>
</div>
-->

<!-- footer(S) -->
<div class="grid-wrapper footer">
	<div id="footer" class="grid">	

		<div class="grid__cell unit-1-2--lap">
			<h3><img src="http://webtools.qiniudn.com/master-LOGO-20150410_50.jpg" height="50"></h3>
            <p>
            <font size="3px;">PhalApi is a light-weight PHP framework for API.<br/>
                We try to keep PhalApi as stuip simple as possible!
            </font>
			</p>
			<p align="left">
				<font size="2px">&copy;2015-2016 PhalApi All Rights Reserved. 粤ICP备15028808号</font>
				<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1255326144'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1255326144%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
			</p>
		</div>	

		<div class="grid__cell unit-1-2--lap">
			<h3>Thanks!</h3>

			<div class="nav">
				<ul class="footer__nav">
					<li class="menu-item"><a href="http://www.oschina.net/" class="menu-item__link" target="_blank">Open Source China</a></li>
					<li class="menu-item"><a href="http://www.phalconphp.com/en/" class="menu-item__link" target="_blank">Phalcon</a></li>
					<li class="menu-item"><a href="https://phpunit.de/manual/3.7/zh_cn/automating-tests.html" class="menu-item__link" target="_blank">PHPUnit</a></li>
					<li class="menu-item"><a href="http://www.thoughtworks.com/cn/" class="menu-item__link" target="_blank">ThoughtWorks</a></li>
				</ul>
			</div>

            <div id="perspectives">
                <div class="email-signup">
                    <strong><a href="https://auth.alipay.com/login/index.htm" target="_blank">Alipay&nbsp;</a>Donate: </strong>chanzonghuang@gmail.com
                </div>
            </div>

			<p>
				<!-- JiaThis Button BEGIN -->
				<div id="ckepop">
				<span class="jiathis_txt">Share: </span>
				<a class="jiathis_button_tsina">Weibo</a>
				<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">More</a>
				<a class="jiathis_counter_style"></a>
				</div>
				<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
				<!-- JiaThis Button END -->
				
			</p>
		</div>
	</div>
</div>
<!-- footer(E) -->

</body>

<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1254743218'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/q_stat.php%3Fid%3D1254743218' type='text/javascript'%3E%3C/script%3E"));</script>

</html>
